Skip to content

Conversation

@Math-R
Copy link

@Math-R Math-R commented Nov 27, 2025

Description

Issues

Checklist

  • This PR contains a description of the changes I'm making
  • I've read the Contribution Guidelines
  • I've added tests for changes or features I've introduced
  • I documented any high-level concepts I'm introducing in documentation/
  • CI is currently green and this is ready for review

Math-R and others added 30 commits October 28, 2025 11:54
-first step to transform trainrunSection.nbOfStops, in actual nodes
`TrainrunsectionHelper.getTravelTime()` computes the new travel time of a trainrunSection, either by using the
`travelTimeFactor` and the current travel time of the section, or by using the total trainrun travel time and
the sum of the new travel times computed up to that point.

This logic can be split into 2 independent functions, which will be used depending on whether the considered section
is the last one to compute or not.

Signed-off-by: Clara Ni <[email protected]>
Until now, a time structure has represented one or several trainrun sections without any stops,
so it could be described by its departure and arrival times (right and left) and its travel time.
Since we are now going to handle several trainrun sections that include stops, we need to add a
 new property to store the total stop time in the time structure.

Signed-off-by: Clara Ni <[email protected]>
…masked

The behavior is pretty much the same as when a node is a non-stop node, except
when updating the travel time, because we need to take into account the stop times of the reduced nodes.

Signed-off-by: Clara Ni <[email protected]>
…ode()

replaceIntermediateStopWithNode() recomputes a bunch of transition
position stuff. At import time, tt was working with incorrect node
positions, routing everything to the (0, 0) position. This causes
transition positions to be mis-rendered.

Instead, set the node position at initialization, before calling
replaceIntermediateStopWithNode(). That way the function can work
with the final node position. As a bonus, the "new node" event is
fired with the correct node position.

Signed-off-by: Simon Ser <[email protected]>
Fixes: 435f1c6 ("import: handle importing old files with numberOfStops")
- Add createViewObjectForCollapsedChain() static method to handle path routing between start/end nodes

- Replace standard TrainrunSectionViewObject creation with custom method for collapsed chains

- Path now correctly goes from first visible node to last visible node instead of using primary section's path
TrainrunSectionViewObject will represent multiple trainrun sections
soon. Add a helper to get the parent trainrun to reduce reliance
on a single trainrun.

Signed-off-by: Simon Ser <[email protected]>
This makes it clear that there isn't a single trainrun section
per TrainrunSectionViewObject: a single TrainrunSectionViewObject
can hold multiple sections. The full collapsed chain is stored.

For now, blindly replace trainrunSection with trainrunSections[0],
to be cleaned up in future commits.

Signed-off-by: Simon Ser <[email protected]>
The TrainrunSectionViewObject already contains the full chain, no
need to re-compute it.

Signed-off-by: Simon Ser <[email protected]>
…Key()

We were only using the first trainrun section's path here.

Expose a getPath() method to get a view object's path. We need to
call it from inside generateKey() so drop the static attribute.

While at it, make the generateKey() helper function private because
it shouldn't be called from elsewhere.

Signed-off-by: Simon Ser <[email protected]>
Target arrival was included twice, and source arrival was missing.

Signed-off-by: Simon Ser <[email protected]>
We were only grabbing metadata from the first section, but we need
to make the key change when the last section changes.

Signed-off-by: Simon Ser <[email protected]>
Instead, grab the path from TrainrunSectionViewObject.getPath().

We need to update a few functions to take the veiw object instead
of the first trainrun section.

Signed-off-by: Simon Ser <[email protected]>
This function overwrites a trainrun section's path. Instead, pick
the right section (first or last) when computing path-related
outputs.

Signed-off-by: Simon Ser <[email protected]>
Further down, these two calls return the same values:

    this.getTrainrun().getTrainrunFrequency().frequency
    this.getTrainrun().getTrainrunFrequency().offset

Signed-off-by: Simon Ser <[email protected]>
…ect.generateKey()

Only the source matters for the first section, the target is handled
by the last section of the chain.

Same as this commit, but for the consecutive time:
9689208

Signed-off-by: Simon Ser <[email protected]>
Math-R and others added 14 commits November 27, 2025 15:23
…inrunSection param

-Remove TrainrunSection parameter support (accept only TrainrunSectionViewObject)

-Merge duplicate switch statements into single switch

-Merge Source/Target and Departure/Arrival into single case
-use complete path for collapsed nodes in text rotation
…pec accordingly to the isCollapsed's model change
This commit addresses issue:
OpenRailAssociation/osrd#13292

Details:
- Adds new component GlobalNodesManagementComponent in app/view/editor-edit-tools-view-component
- The new component controls the isCollapsed state of the nodes
- Adds EN and FR translations for the new component
- Adds the new component to the existing EditorEditToolsViewComponent panel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants